package F21AS_Freddy.AFJ_Taxikiosk.src;

/**
 * This class Main Class
 * @author Freddy Wong
 * F21AS Course Work Stage2 @ Year 2015
 */
public class TrainingDataMain {

	// path to the Queue's CSV input file
	private static final String QUEUE_INPUT_FILE = "PassengerList.csv";

	public static void main(String[] args) {

		/**
		 * Create first queue
		 */
		Queue queue = new Queue(QUEUE_INPUT_FILE);
		QueueGUI queueGUI = new QueueGUI(queue);
		QueueController queueController = new QueueController(queue, queueGUI);
		
		//create the passenger list
		PassengerList passengerList = new PassengerList();
		
		/**
		 * Create KIOSK 1 & KIOSK 2
		 */
		Kiosk kiosk = new Kiosk(queue, passengerList);
		KioskGUI kioskGUI = new KioskGUI(kiosk, 1);
		KioskController kioskController = new KioskController(kiosk, kioskGUI);
		
		Kiosk kiosk1 = new Kiosk(queue, passengerList);
		KioskGUI kioskGUI1 = new KioskGUI(kiosk1, 2);
		KioskController kioskController1 = new KioskController(kiosk1, kioskGUI1);
		
		// create a controller to handle the window
		// close events for the two GUI components
		TrainingDataManager guiController = new TrainingDataManager(queue, kiosk);

		// add the controller to both GUIs' window listeners
		queueGUI.addWindowListener(guiController);
		kioskGUI.addWindowListener(guiController);
		kioskGUI1.addWindowListener(guiController);

	}
} // End Of TrainingData Class
